<%-- 
    Document   : orderlist
    Created on : 2019-9-24, 11:11:59
    Author     : 10592
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <link type="text/css" rel="stylesheet" href="css/style.css" />
    </head>
    <body>
        <div id="header" class="wrap">
            <div id="logo">网上书城</div>
            <div id="navbar">
                <div class="userMenu">
                    <ul>
                        <li><a href="index.html">User首页</a></li>
                        <li class="current"><a href="orderlist.html">我的订单</a></li>
                        <li><a href="shopping.jsp?action=add">购物车</a></li>
                        <li><a href="#">注销</a></li>
                    </ul>
                </div>
                <form method="get" name="search" action="">
                    搜索：<input class="input-text" type="text" name="keywords" /><input class="input-btn" type="submit" name="submit" value="" />
                </form>
            </div>
        </div>
        <div id="content" class="wrap">
            <div class="list orderList">
                <c:if test="${empty orderList}">
                    <h1>目前没有任何商品</h1>
                </c:if>
                <c:if test="${not empty orderList}"> 
                    <h1>目前有商品</h1>
                    <table>
                        <tr class="title">
                            <th class="orderId">订单编号</th>
                            <th>订单商品</th>
                            <th class="userName">收货人</th>
                            <th class="price">订单金额</th>
                            <th class="createTime">下单时间</th>
                            <th class="status">订单状态</th>
                        </tr>
                        <c:forEach items="${orderList}" var="b" varStatus="status">
                            <tr>
                                <td>${b.oid}</td>
                                <td class="thumb"><img src="${b.bookImage}" /></td>
                                <td>${b.userName}</td>
                                <td>￥${b.totalPrice}</td>
                                <td>${b.createDate}</td>
                                <td>已完成</td>
                            </tr>
                        </c:forEach>
                        
                    </table>
             
                </c:if>

         
                <form action="order.html" method="post" >
                    <div class="page-spliter">
                        <a href="#">&lt;</a>
                        <a href="#">首页</a>
                        <span class="current">1</span>
                        <a href="#">2</a>
                        <a href="#">3</a>
                        <a href="#">4</a>
                        <span>...</span>
                        <a href="#">尾页</a>
                        <a href="#">&gt;</a>
                    </div>
                    <div class="button"><input class="input-gray" type="submit" name="submit" value="查看一个月前的订单" /><input class="input-gray" type="submit" name="submit" value="查看一个月前的订单" /></div>
                <form action="order.html" method="post" >
            </div>
        </div>
        <div id="footer" class="wrap">
            网上书城 &copy; 版权所有

        </div>
    </body>
</html>
